package com.petHis.project.system.financial.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.petHis.project.system.financial.mapper.FinancialRecordMapper;
import com.petHis.project.system.financial.domain.FinancialRecord;
import com.petHis.project.system.financial.service.IFinancialRecordService;
import com.petHis.common.utils.text.Convert;

/**
 * 财务收支记录Service业务层处理
 * 
 * @author petHis
 * @date 2025-02-24
 */
@Service
public class FinancialRecordServiceImpl implements IFinancialRecordService 
{
    @Autowired
    private FinancialRecordMapper financialRecordMapper;


    /**
     * 查询财务收支记录
     * 
     * @param recordId 财务收支记录主键
     * @return 财务收支记录
     */
    @Override
    public FinancialRecord selectFinancialRecordByRecordId(Long recordId)
    {
        return financialRecordMapper.selectFinancialRecordByRecordId(recordId);
    }

    /**
     * 查询财务收支记录列表
     * 
     * @param financialRecord 财务收支记录
     * @return 财务收支记录
     */
    @Override
    public List<FinancialRecord> selectFinancialRecordList(FinancialRecord financialRecord)
    {
        return financialRecordMapper.selectFinancialRecordList(financialRecord);
    }

    /**
     * 新增财务收支记录
     * 
     * @param financialRecord 财务收支记录
     * @return 结果
     */
    @Override
    public int insertFinancialRecord(FinancialRecord financialRecord)
    {
        return financialRecordMapper.insertFinancialRecord(financialRecord);
    }

    /**
     * 修改财务收支记录
     * 
     * @param financialRecord 财务收支记录
     * @return 结果
     */
    @Override
    public int updateFinancialRecord(FinancialRecord financialRecord)
    {
        return financialRecordMapper.updateFinancialRecord(financialRecord);
    }

    /**
     * 批量删除财务收支记录
     * 
     * @param recordIds 需要删除的财务收支记录主键
     * @return 结果
     */
    @Override
    public int deleteFinancialRecordByRecordIds(String recordIds)
    {
        return financialRecordMapper.deleteFinancialRecordByRecordIds(Convert.toStrArray(recordIds));
    }

    /**
     * 删除财务收支记录信息
     * 
     * @param recordId 财务收支记录主键
     * @return 结果
     */
    @Override
    public int deleteFinancialRecordByRecordId(Long recordId)
    {
        return financialRecordMapper.deleteFinancialRecordByRecordId(recordId);
    }
}
